//
//  HMPictureCell.swift
//  WeiBoSwift
//
//  Created by hgj on 2016/11/17.
//  Copyright © 2016年 HuGuoJian. All rights reserved.
//

import UIKit

class HMPictureCell: UICollectionViewCell {

    @IBOutlet weak var imageView: UIImageView!
    
    @IBOutlet weak var gifIcon: UIImageView!
    
    var pictureInfo: HMPictureInfo? {
        didSet {
            //设置url
//            let url = URL(string: pictureInfo?.thumbnail_pic ?? "")
            imageView.sd_setImage(with: pictureInfo?.imageURL)
            
            //设置icon显示或者隐藏
            self.gifIcon.isHidden = !pictureInfo!.thumbnail_pic!.hasSuffix(".gif")

        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
    }
}
